-----------------------------------------
-- ID: 5697
-- Item: pepperoni_pizza
-- Food Effect: 3 hours, all Races
-----------------------------------------
-- HP +30
-- Strength 1
-- Accuracy 9% (caps @ 10)
-- Attack 10% (caps @ 15)
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------

function onItemCheck(target)
    local result = 0;
    if (target:hasStatusEffect(dsp.effect.FOOD) == true or target:hasStatusEffect(dsp.effect.FIELD_SUPPORT_FOOD) == true) then
        result = 246;
    end
    return result;
end;

function onItemUse(target)
    target:addStatusEffect(dsp.effect.FOOD,0,0,10800,5697);
end;

function onEffectGain(target,effect)
    target:addMod(dsp.mod.HP, 30);
    target:addMod(dsp.mod.STR, 1);
    target:addMod(dsp.mod.FOOD_ATTP, 10);
    target:addMod(dsp.mod.FOOD_ATT_CAP, 15);
    target:addMod(dsp.mod.FOOD_ACCP, 9);
    target:addMod(dsp.mod.FOOD_ACC_CAP, 10);
end;

function onEffectLose(target, effect)
    target:delMod(dsp.mod.HP, 30);
    target:delMod(dsp.mod.STR, 1);
    target:delMod(dsp.mod.FOOD_ATTP, 10);
    target:delMod(dsp.mod.FOOD_ATT_CAP, 15);
    target:delMod(dsp.mod.FOOD_ACCP, 9);
    target:delMod(dsp.mod.FOOD_ACC_CAP, 10);
end;
